import 'package:flutter/material.dart';
import 'package:shopping_group/base/page_constance.dart';
import 'package:shopping_group/modle/more/entity/group_fulipush_finish_entity.dart';
import 'package:shopping_group/res/colors.dart';
import 'package:shopping_group/res/dimens.dart';
import 'package:shopping_group/utils/route_util.dart';
import 'package:shopping_group/utils/widget_utils.dart';
import 'package:shopping_group/view/button_progress_view.dart';

class FuliPlayokPage extends StatefulWidget {
  final GroupFuliPushFinishEntity entity;
  FuliPlayokPage({Key key, this.entity}) : super(key: key);

  @override
  _FuliPlayokPageState createState() => _FuliPlayokPageState();
}

class _FuliPlayokPageState extends State<FuliPlayokPage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: WidgetUtils.showAppar(context, '推广成功', onTapClose: () {
        RouteUtil.popUntil(PageConstance.MAIN_PAGE);
      }),
      body: Container(
          height: double.infinity,
          decoration: new BoxDecoration(
            color: Colours.title_white,
          ),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              SizedBox(
                height: 16,
              ),
              Padding(
                padding: EdgeInsets.symmetric(horizontal: 16),
                child: WidgetUtils.getTextColorView(this.widget.entity.remark,
                    Colours.themeColor, Dimens.FONT_SIZE_28),
              ),
              SizedBox(
                height: 8,
              ),
              Padding(
                padding: EdgeInsets.symmetric(horizontal: 16),
                child: WidgetUtils.getTextColorView(
                    '已参加${this.widget.entity.pushCt}',
                    Colours.themeColor,
                    Dimens.FONT_SIZE_22),
              ),
              SizedBox(
                height: 8,
              ),
              Padding(
                padding: EdgeInsets.symmetric(horizontal: 16),
                child: WidgetUtils.getTextColorView(
                    '剩余${this.widget.entity.senYuCt}次',
                    Colours.themeColor,
                    Dimens.FONT_SIZE_22),
              ),
              Expanded(child: Container()),
              ButtonProgressView.crateCupertinoView(' 返回首页 ',
                  cupertinoCall: () {
                Navigator.of(context).popUntil((route) => route.isFirst);
              }),
              SizedBox(
                height: 64,
              ),
            ],
          )),
    );
  }

  @override
  void dispose() {
    super.dispose();
  }
}
